#define _CRT_SECURE_NO_WARNINGS
#include<stdio.h>
int jjj(unsigned int n)
{
	if (n == 1)
	{
		return 1;
	}
	else
	{
		return jjj(n - 1) * n;
	}
}
int main()
{
	int m = 0;
	scanf("%d", &m);
	int j = jjj(m);
	printf("%d", j);
	return 0;
}